import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/components/index/index';
import Discover from '@/components/discover/discover';
import Note from '@/components/note/note';
import My from '@/components/my/my';
import Login from '@/components/login/login';
import Register from '@/components/register/register';
import RecentPlay from '@/components/recent-play/recent-play';
import UserInfo from '@/components/user-info/user-info';
import MyCollected from '@/components/my-collected/my-collected';
import DownloadRecord from '@/components/download-record/download-record';
import About from '@/components/about/about';
import Feedback from '@/components/feedback/feedback';
Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            component: Index
        },
        {
            path: '/index',
            name: 'Index',
            component: Index
        },
        {
            path: '/discover',
            name: 'Discover',
            component: Discover,
        },
        {
            path: '/note',
            name: 'Note',
            component: Note,
            // children: [
            //     {
            //         // 当 /user/:id/profile 匹配成功，
            //         // UserProfile 会被渲染在 User 的 <router-view> 中
            //         path: 'info/:src',
            //         component: NoteInfo
            //     },
            // ]
        },
        {
            path: '/my',
            name: 'My',
            component: My,
        },
        {
            path: '/login',
            name: 'Login',
            component: Login,
        },
        {
            path: '/register',
            name: 'Register',
            component: Register,
        },
        {
            path: '/recent',
            name: 'RecentPlay',
            component: RecentPlay
        },
        {
            path: '/downloadRecord',
            name: 'DownloadRecord',
            component: DownloadRecord,
        },
        {
            path: '/userInfo',
            name: 'UserInfo',
            component: UserInfo
        },
        {
            path: '/myCollected',
            name: 'MyCollected',
            component: MyCollected,
        },
        {
            path: '/about',
            name: 'About',
            component: About
        },
        {
            path: '/feedback',
            name: 'Feedback',
            component: Feedback
        },
    ]
})
